import mod from './common.js'
console.log(mod)

/**
 * ESM中没有CommonJS模块全局成员
 * require可以用import
 * exports可以用export
 * 其他需要模拟
 */
import { fileURLToPath } from 'url'
import { dirname } from 'path'
const __filename = fileURLToPath(import.meta.url)
console.log(__filename)
const __dirname = dirname(__filename)
console.log(__dirname)